import AsButton from "./package/button/index";
import AsButtonGroup from "./package/button-group";
import { AsRadio, AsRadioButton } from "./package/radio";
import AsRadioGroup from "./package/radio-group";
import {
  AsCheckbox,
  AsCheckboxGroup,
  AsCheckboxButton
} from "./package/checkbox";
import AsInput from "./package/input";
import { AsOption, AsSelect } from "./package/select";
import { AsDropdown, AsDropdownMenu, AsDropdownItem } from "./package/dropdown";
import AsSwitch from "./package/switch";
import AsDatePick from "./package/date-pick";
import AsDialog from "./package/dialog";
import AsPopover from "./package/popover";
import AsPopconfirm from "./package/popconfirm";
import AsMessage from "./package/message";
import Asnotification from "./package/notification";

const components = [
  AsButton,
  AsButtonGroup,
  AsRadio,
  AsRadioButton,
  AsRadioGroup,
  AsCheckbox,
  AsCheckboxGroup,
  AsCheckboxButton,
  AsInput,
  AsSelect,
  AsOption,
  AsDropdown,
  AsDropdownMenu,
  AsDropdownItem,
  AsSwitch,
  AsDatePick,
  AsDialog,
  AsPopover,
  AsPopconfirm
];

const install = function(Vue) {
  components.forEach(component => {
    Vue.component(component.name, component);
  });

  Vue.prototype.$message = AsMessage;
  Vue.prototype.$notify = Asnotification;
};

export default {
  install
};

export {
  AsButton,
  AsButtonGroup,
  AsRadio,
  AsRadioButton,
  AsRadioGroup,
  AsCheckbox,
  AsCheckboxGroup,
  AsCheckboxButton,
  AsInput,
  AsSelect,
  AsOption,
  AsDropdown,
  AsDropdownMenu,
  AsDropdownItem,
  AsSwitch,
  AsDatePick,
  AsDialog,
  AsPopover,
  AsPopconfirm,
  AsMessage,
  Asnotification
};
